{{extend "base.html"}}

{{block content}}
<div style="padding: 5px;">
		<table class="tableForm" id="tb">
        	<tbody>
			<tr>
                  <th style="width:80px;">机房机柜</th>
                  <td>{{=cr_name}}&nbsp&nbsp{{=rackspace_name}}
                  </td>
			</tr>
            <tr>
				<th style="width: 80px;">设备型号</th>
				<td>{{=hardware_manufacturer}}&nbsp&nbsp{{=hardware_name}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">序列号</th>
				<td>{{=server_sn}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">资产编号</th>
				<td>{{=server_asset_tag}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">设备U数</th>
				<td>{{=server_height}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">是否包含CDROM</th>
				<td>{{=server_cdrom}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">RAID卡型号</th>
				<td>{{=server_raidtype}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">保修状态</th>
				<td>{{=hardwarewarranty_id}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">保修到期日</th>
				<td>{{=server_warranty_datetime}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">采购价格</th>
				<td>{{=server_price}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">采购负责人</th>
				<td>{{=server_purchasing_director}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">采购日期</th>
				<td>{{=server_buy_datetime}}
				</td>
			</tr>
           <tr>
				<th style="width: 80px;">CPU信息</th>
                <td>
                	<table>
                	  <thead>
                      	<tr>
                        	<td>型号</td>
                            <td>频率</td>
                            <td>物理数</td>
                        </tr>
                       </thead>
                       {{for i in cpu:}}
                        <tr>
                            <td>{{=i.servercpu_type}}</td>
                            <td>{{=i.servercpu_hz}}</td>
                            <td>{{=i.servercpu_num}}</td>
                        </tr>
                        {{pass}}
                     </table>
                  </td>
			</tr>
            <tr>
				<th style="width: 80px;">内存信息</th>
                <td>
                	<table>
                	  <thead>
                      	<tr>
                        	<td>型号</td>
                            <td>频率</td>
                            <td>单条容量</td>
                            <td>数量</td>
                        </tr>
                       </thead>
                       {{for i in mem:}}
                        <tr>
                            <td>{{=i.servermem_type}}</td>
                            <td>{{=i.servermem_hz}}</td>
                            <td>{{=i.servermem_size}}</td>
                            <td>{{=i.servermem_num}}</td>
                        </tr>
                        {{pass}}
                     </table>
                  </td>
			</tr>
            <tr>
				<th style="width: 80px;">硬盘信息</th>
                <td>
                	<table>
                	  <thead>
                      	<tr>
                        	<td>型号</td>
                            <td>频率</td>
                            <td>单盘容量</td>
                            <td>数量</td>
                        </tr>
                       </thead>
                       {{for i in disk:}}
                        <tr>
                            <td>{{=i.serverdisk_type}}</td>
                            <td>{{=i.serverdisk_speed}}</td>
                            <td>{{=i.serverdisk_size}}</td>
                            <td>{{=i.serverdisk_num}}</td>
                        </tr>
                        {{pass}}
                     </table>
                  </td>
			</tr>
  			<tr>
				<th style="width: 80px;">电源信息</th>
                <td>
                	<table>
                	  <thead>
                      	<tr>
                        	<td>型号</td>
                            <td>功率</td>
                            <td>数量</td>
                        </tr>
                       </thead>
                       {{for i in power:}}
                        <tr>
                            <td>{{=i.serverpower_type}}</td>
                            <td>{{=i.serverpower_kw}}</td>
                            <td>{{=i.serverpower_num}}</td>
                        </tr>
                        {{pass}}
                     </table>
                  </td>
			</tr>
           <tr>
				<th style="width: 80px;">网卡信息</th>
                <td>
                	<table>
                	  <thead>
                      	<tr>
                        	<td>型号</td>
                            <td>数量</td>
                        </tr>
                       </thead>
                       {{for i in eth:}}
                        <tr>
                            <td>{{=i.servereth_type}}</td>
                            <td>{{=i.servereth_num}}</td>
                        </tr>
                        {{pass}}
                     </table>
                  </td>
			</tr>
			<tr>
				<th style="width:80px;">操作系统</th>
				<td>{{=os_name}}
				</td>
			</tr>
			<tr>
				<th style="width: 80px;">主机名</th>
				<td>{{=system_hostname}}
				</td>
			</tr>			
			<tr>
				<th style="width: 80px;">RAID配置</th>
				<td>{{=system_raid}}
				</td>
			</tr>
			<tr>
				<th style="width: 80px;">系统分区</th>
				<td colspan="3">{{=system_partition}}
				</td>
			</tr> 
			<tr>
                  <th style="width:80px;">状态信息</th>
                  <td>{{=hardwarestatus}}
                  </td>
			</tr>
            <tr>
				<th style="width: 80px;">应用主题</th>
				<td>{{=department_name}}&nbsp&nbsp{{=opersgroup_name}}&nbsp&nbsp{{=opersgroupproject_name}}&nbsp&nbsp{{=applicationtype_name}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">网卡接入配置</th>
				<td>
                	<table>
                	  	<thead><tr><td>类型</td><td>设备名</td><td>物理接口</td><td>ip地址</td><td>mac地址</td><td>映射IP</td><td>交换机</td><td>交换机端口</td></tr></thead>
                        {{for i in eth_ip:}}
                        <tr>
                            <td>{{if i.ethernet_type == 0:}}虚拟{{else:}}物理{{pass}}</td>
                            <td>{{=i.ethernet_dev_name}}</td>
                            <td>{{if i.ethernet_physical_interface != 0:}}{{=i.ethernet_physical_interface}}{{pass}}</td>
                            <td>{{=i.ethernet_ip}}</td>
                            <td>{{=i.ethernet_mac}}</td>
                            <td>{{=i.ethernet_mip}}</td>
                            <td>{{if i.switch_id != None:}}{{=i.switch_id.switch_aliasname}}{{pass}}</td>
                            <td>{{if i.switchport_id_port != 0:}}{{=i.switchport_id_port}}{{pass}}</td>
                         </tr>
                         {{pass}}
                     </table>
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">备注</th>
				<td>{{=comment}}</td>
			</tr>      
            </tbody>    
		</table>
</div>
{{end}}